home *** CD-ROM | disk | FTP | other *** search
- <%
- Sub Addmenu(menutype)
- Set fs = CreateObject("Scripting.FileSystemObject")
- If menutype="state" then
- filename=server.mappath("/statelist-commadelim.txt")
- Else
- filename=server.mappath("/isocountry.txt")
- End If
- Set readfile=fs.OpenTextFile(filename,1,False)
- Text=readfile.readline
- Totalchars = Len(text)
- Pointer = instr(text,",")
- SCode = Left(text,Pointer-1)
- Do until readfile.atendofstream
- text=readfile.readline
- Totalchars = Len(text)
- Pointer = instr(text,",")
- SCode = Left(text,Pointer-1)
- SLabel = mid(text,Pointer+1)
- If SCode="us" then
- response.write "<option selected value=""" & SCode & """>" & SLabel & "</option>"
- Else
- response.write "<option value=""" & SCode & """>" & SLabel & "</option>"
- End If
- Loop
- End Sub
- %>